﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ec" uri="http://www.ecside.org" %>

<html>
	<head>
		<title>日志查询</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<%@ include file="/jsp/common/pub_js_css.jsp"%>
		
	</head>
	<body>
		<table style="width:100%">
			<tr>
				<td>
					<div id="dataListTitle" class="Noprint">
						&nbsp;日志查询
					</div>
					<div id="dataListInner" search="true" class="Noprint">
						<form id="formA" name="searchForm" action="${pageContext.request.contextPath}/sysLog!search.action" method="POST">
							<table width="100%">
						    	<tr>
						       		<td>
										<table>
									    	<tr>									       		
												<td class="labelcontent">
										       		注册名：
										       	</td>
										       	<td class="controlcontent" >
													<input type="text" id="regName" name="entitySearch.regName" value="${entitySearch.regName}"  class="txt150" onkeydown="EnterToTab();">
												</td>												
												<td class="labelcontent">
										       		真实姓名：
										       	</td>
										       	<td class="controlcontent" >
													<input type="text" id="realName" name="entitySearch.realName" value="${entitySearch.realName}"  class="txt150" onkeydown="EnterToTab();">
												</td>																							
												<td class="labelcontent">
										       		日志内容：
										       	</td>
										       	<td class="controlcontent" >
													<input type="text" id="logContent" name="entitySearch.logContent" value="${entitySearch.logContent}"  class="txt150" onkeydown="EnterToTab();">
												</td>
											</tr>
											<tr>
												<td class="labelcontent">
													记录时间：
												</td>
												<td class="controlcontent">
													<input type="text" id="beginLogTimeSea" name="entitySearch.beginLogTimeSea" value="${entitySearch.beginLogTimeSea}"  class="txt150" onkeydown="EnterToTab();">
													<img id="beginLogTimeSeaImg" src="${pageContext.request.contextPath}/images/icons/datePicker.gif" align="absmiddle" style="cursor:pointer" title="选择" />
													<span id="beginLogTimeSeaTip"></span>
												</td>				
												<td class="labelcontent">
													至：
												</td>
												<td class="controlcontent">
													<input type="text" id="endLogTimeSea" name="entitySearch.endLogTimeSea" value="${entitySearch.endLogTimeSea}"  class="txt150" onkeydown="EnterToTab();">
													<img id="endLogTimeSeaImg" src="${pageContext.request.contextPath}/images/icons/datePicker.gif" align="absmiddle" style="cursor:pointer" title="选择" />
													<span id="endLogTimeSeaTip"></span>
												</td>	
											</tr>
									  	</table>
									</td>
									<td width="1%" valign="top" align="right">
										<button id="btnSearch" name="btnSearch" onclick="search();" >查询</button>
									</td>
								</tr>
						  	</table>
					  	</form>
					</div>
					<label id="info">
						<s:actionerror />
						<s:actionmessage />
					</label>
					<table width="100%" border="0" cellpadding="0" cellspacing="0"
						id="dataArea">
						<tr>
							<td>
								<ec:table items="dataList" var="record" width="100%"
									autoIncludeParameters="true" retrieveRowsCallback="limit"
									sortRowsCallback="limit" classic="true" toolbarLocation="top"
									useAjax="true" doPreload="false" showHeader="true"
									pageSizeList="5,10,20,40"
									action="${pageContext.request.contextPath}/sysLog!search.action"
									toolbarContent="navigation|pagejump|pagesize|status|refresh|export|extend"
									showPrint="true" resizeColWidth="true" xlsFileName="日志查询.xls"
									sortable="true" listHeight="100%" listWidth="100%"
									filterable="true">
									<ec:extend>
										<div align="right">										
										</div>
									</ec:extend>
									<ec:row highlightRow="true" selectlightRow="true">
										<ec:column cell="checkbox" headerCell="checkbox" alias="ids"
											value="${record.id}" width="17" viewsAllowed="html" />

										<ec:column property="regName" title="注册名" width="8%"/>
										<ec:column property="realName" title="真实姓名" width="8%"/>
										<ec:column property="userIp" title="计算机IP" width="10%"/>
										<ec:column property="logTime" title="记录时间" width="15%"/>
										<ec:column property="logContent" title="日志内容" width="35%"/>
																				
										<ec:column width="60" property="hh" title="操作"
											viewsDenied="xls,csv,pdf,print" sortable="false">
											<img src="${pageContext.request.contextPath}/images/icons/view.png" onClick="toView('${record.id}');" alt="查看"/>
																					
										</ec:column>
									</ec:row>
								</ec:table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>

		<script type="text/javascript">
			jQuery(document).ready(function(){
					jQuery.formValidator.initConfig({validatorgroup:"1",onerror:function(){info();}});
					
					Calendar.setup ({inputField : "beginLogTimeSea", ifFormat : "%Y-%m-%d %H:%M:%S", button : "beginLogTimeSeaImg", singleClick : true, showsTime:true, step : 1 } );	
					jQuery("#beginLogTimeSea").formValidator({validatorgroup:"1"}).functionValidator({fun:isDateTimeEmpty,onerror:"格式为YYYY-MM-dd HH:mm:ss"});
					Calendar.setup ({inputField : "endLogTimeSea", ifFormat : "%Y-%m-%d %H:%M:%S", button : "endLogTimeSeaImg", singleClick : true, showsTime:true, step : 1 } );	
					jQuery("#endLogTimeSea").formValidator({validatorgroup:"1"}).functionValidator({fun:isDateTimeEmpty,onerror:"格式为YYYY-MM-dd HH:mm:ss"});
						
				});
			
			
			//查询
			function search(){
				if(validator('1')){					
					searchForm.submit();
				}
			}
			
						
			//查看
			function toView(tId){				
				var url = '${pageContext.request.contextPath}/sysLog!toView.action?id='+tId;
				popWindow(url,700,450);			
			}
				
				
		

		</script>

	</body>
</html>
